import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/pp/sys/user/list',
    method: 'get',
    params: { ...params, name: params.key, userName: params.key }
  })
}

export function add(data) {
  return request({
    url: '/pp/sys/user/add',
    method: 'post',
    data: data
  })
}

export function del(ids) {
  return request({
    url: '/pp/sys/user/delete',
    method: 'post',
    params: { ids }
  })
}

export function edite(data) {
  return request({
    url: '/pp/sys/user/edite',
    method: 'post',
    data: data
  })
}

export function resetPass(data) {
  return request({
    url: '/pp/sys/user/password/reset',
    method: 'post',
    data: data
  })
}

export function statusSwitch(data) {
  console.log(data)
  return request({
    url: '/pp/sys/user/status/switch',
    method: 'post',
    data: data
  })
}
